﻿<%@ Page Language="C#" %>
<%@ Register Assembly="Typps" Namespace="Typps" TagPrefix="t" %>
<%--/*http://developer.yahoo.com/yui/yuitest/*/--%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
    DAL.Simulation.MyImages images = null;
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void ObjectDataSource1_ObjectCreating(object sender, ObjectDataSourceEventArgs e)
    {
        if (images == null)
            images = new DAL.Simulation.MyImages(HttpContext.Current);
        e.ObjectInstance = images;
    }
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <!--CSS-->
    <link rel="stylesheet" type="text/css" href="../yuitest/css/logger.css" />
    <link rel="stylesheet" type="text/css" href="../yuitest/css/testlogger.css" />
    <!-- Dependencies -->
    <script src="../yuitest/yahoo-dom-event.js" type="text/javascript"></script>
    <script src="../yuitest/logger-min.js" type="text/javascript"></script>
    <!-- Source File -->
    <script src="../yuitest/yuitest-min.js" type="text/javascript"></script>
    <script src="../yuitest/event-simulate-min.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" ScriptMode="Debug" runat="server">
        </asp:ScriptManager>
        <t:MediaFrame ID="MediaFrame1" MinFrameWidth="500" CustomSkin="KnightRider" MinFrameHeight="212" DisplayHeader="false" AutoStartSlideShow="true" Skin="KnightRider"
         Display="Static" DataSourceID="ObjectDataSource1"
        PageSize="3" runat="server">
    </t:MediaFrame>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" TypeName="DAL.Simulation.MyImages"
        OnObjectCreating="ObjectDataSource1_ObjectCreating" SelectMethod="GetImagesFromFileSystem">
        <SelectParameters>
            <asp:Parameter Name="folderName" DefaultValue="~/MediaFrame/Images/" />
            <asp:Parameter Name="setThumbnails" DefaultValue="false" Type="Boolean" />
        </SelectParameters>
    </asp:ObjectDataSource>
        <br style="clear: both" />
        <div id="test">
        </div>
    </div>
    </form>
    <script type="text/javascript">
        function pageLoad(sender,args) {
            var oTestCase=new YAHOO.tool.TestCase({

                name: "TestCase Media frame",

                //---------------------------------------------
                // Setup and tear down
                //---------------------------------------------

                setUp: function () {
                    this._mediaFrame=$find('<%= MediaFrame1.ClientID %>');
                },

                tearDown: function () {
                    delete this._mediaFrame;
                },

                //---------------------------------------------
                // Tests
                //---------------------------------------------
            });

            //create the logger
            var logger=new YAHOO.tool.TestLogger();

            //add the test cases and suites
            YAHOO.tool.TestRunner.add(oTestCase);

            //run all tests
            YAHOO.tool.TestRunner.run();
        }
    </script>
</body>
</html>
